#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);


}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_editName_textChanged(const QString &arg1)
{
    ui->labName->setText(ui->editName->text());
}


void MainWindow::on_editIdCard_textChanged(const QString &arg1)
{
    ui->labIdCard->setText(ui->editIdCard->text());
}


void MainWindow::on_editPhone_textChanged(const QString &arg1)
{
    ui->labPhone->setText(ui->editPhone->text());
}


void MainWindow::on_editPswd_textChanged(const QString &arg1)
{
    ui->labPsed->setText(ui->editPswd->text());
}


void MainWindow::on_comboBox_currentTextChanged(const QString &arg1)
{
    ui->labPort->setText(arg1);
}


void MainWindow::on_checkBox_clicked(bool checked)
{
    if(checked == true){
        ui->c1->setChecked(true);
        ui->c2->setChecked(true);
        ui->c3->setChecked(true);
        ui->c4->setChecked(true);
        ui->c5->setChecked(true);
        ui->c6->setChecked(true);
        ui->c7->setChecked(true);
        ui->c8->setChecked(true);
        ui->c9->setChecked(true);
        ui->c10->setChecked(true);
        ui->c12->setChecked(true);
        ui->c13->setChecked(true);
        ui->c14->setChecked(true);
        ui->c15->setChecked(true);

        ui->c16->setChecked(true);
        ui->c17->setChecked(true);
        ui->c18->setChecked(true);
        ui->c19->setChecked(true);
        ui->c11->setChecked(true);


    }else if(checked == false){
        ui->c1->setChecked(false);
        ui->c2->setChecked(false);
        ui->c3->setChecked(false);
        ui->c4->setChecked(false);
        ui->c5->setChecked(false);
        ui->c6->setChecked(false);
        ui->c7->setChecked(false);
        ui->c8->setChecked(false);
        ui->c9->setChecked(false);
        ui->c10->setChecked(false);
        ui->c12->setChecked(false);
        ui->c13->setChecked(false);
        ui->c14->setChecked(false);
        ui->c15->setChecked(false);

        ui->c16->setChecked(false);
        ui->c17->setChecked(false);
        ui->c18->setChecked(false);
        ui->c19->setChecked(false);
        ui->c11->setChecked(false);
    }
}

